﻿using System;
using System.Collections.Generic;
using System.Drawing.Drawing2D;
using Autodesk.Revit.ApplicationServices;
using Autodesk.Revit.DB;
using StairsModuleAndEdit.StairsModel.CommonUnit;
using StairsModuleAndEdit.StairsModel.DataInfos;

namespace StairsModuleAndEdit.StairsModel.Kit
{
	internal class DoubleBranceThreeRunStairsKit : ProjectionDrawingKit
	{
		public DoubleBranceThreeRunStairsKit(Application app) : base(app)
		{
		}

		public bool DoubleBranchThreeRunStairsProfileCurves(ref DoubleBranchThreeRunStairs stairs, bool bDrawNoteInfo, int nBasePointIndex, bool bLRMirror, bool bTBMirror, double dRotateAngle, bool bBottom, bool bMid, bool bTop)
		{
			bool result = false;
			LineRunData leftRunData = stairs.m_LeftRunData;
			LineRunData midRunData = stairs.m_MidRunData;
			LineRunData rightRunData = stairs.m_RightRunData;
			LineRunData twoRunLeftData = stairs.m_TwoRunLeftData;
			LineRunData twoRunRightData = stairs.m_TwoRunRightData;
			double width = stairs.m_MiddleLandData.Width;
			double length = stairs.m_MiddleLandData.Length;
			double width2 = stairs.m_SideLandData.Width;
			double length2 = stairs.m_SideLandData.Length;
			double stairsWidth = stairs.getStairsWidth();
			bool bIsCenterUp = stairs.m_bIsCenterUp;
			double num = Geometry.LessThan(leftRunData.RunWidth, midRunData.RunWidth) ? midRunData.RunWidth : leftRunData.RunWidth;
			double num2 = Geometry.LessThan(width2, length) ? length : width2;
			double bundingBoxHeight = num + num2;
			XYZ xyz = new XYZ(0.0, leftRunData.RunLength + width2, 0.0);
			XYZ xyz2 = new XYZ(length2 * 2.0 + twoRunLeftData.RunLength * 2.0 + width, leftRunData.RunLength + width2, 0.0);
			XYZ zero = XYZ.Zero;
			XYZ xyz3 = new XYZ(leftRunData.RunWidth, 0.0, 0.0);
			XYZ xyz4 = new XYZ(leftRunData.RunWidth, leftRunData.RunLength, 0.0);
			XYZ xyz5 = new XYZ(0.0, leftRunData.RunLength, 0.0);
			double num3 = (width > midRunData.RunWidth) ? ((width - midRunData.RunWidth) / 2.0) : 0.0;
			XYZ xyz6 = new XYZ(length2 + twoRunLeftData.RunLength + num3, 0.0, 0.0);
			XYZ xyz7 = xyz6;
			XYZ xyz8 = new XYZ(midRunData.RunWidth, 0.0, 0.0) + xyz6;
			XYZ xyz9 = new XYZ(midRunData.RunWidth, midRunData.RunLength, 0.0) + xyz6;
			XYZ xyz10 = new XYZ(0.0, midRunData.RunLength, 0.0) + xyz6;
			num3 = ((length2 > rightRunData.RunWidth) ? (length2 - rightRunData.RunWidth) : 0.0);
			XYZ xyz11 = new XYZ(length2 + twoRunLeftData.RunLength * 2.0 + width + num3, 0.0, 0.0);
			XYZ xyz12 = xyz11;
			XYZ xyz13 = new XYZ(rightRunData.RunWidth, 0.0, 0.0) + xyz11;
			XYZ xyz14 = new XYZ(rightRunData.RunWidth, rightRunData.RunLength, 0.0) + xyz11;
			XYZ xyz15 = new XYZ(0.0, rightRunData.RunLength, 0.0) + xyz11;
			if (midRunData.TreadCount > leftRunData.TreadCount)
			{
				double num4 = midRunData.RunLength - leftRunData.RunLength;
				XYZ xyz16 = new XYZ(0.0, num4, 0.0);
				xyz7 -= xyz16;
				xyz8 -= xyz16;
				xyz9 -= xyz16;
				xyz10 -= xyz16;
			}
			else if (midRunData.TreadCount < leftRunData.TreadCount)
			{
				double num5 = leftRunData.RunLength - midRunData.RunLength;
				XYZ xyz17 = new XYZ(0.0, num5, 0.0);
				xyz7 += xyz17;
				xyz8 += xyz17;
				xyz9 += xyz17;
				xyz10 += xyz17;
			}
			if (1E-09 < length - width2)
			{
				double num6 = length - width2;
				XYZ xyz18 = new XYZ(0.0, num6, 0.0);
				xyz7 -= xyz18;
				xyz8 -= xyz18;
				xyz9 -= xyz18;
				xyz10 -= xyz18;
			}
			else if (1E-09 > length - width2)
			{
				double num7 = width2 - length;
				XYZ xyz19 = new XYZ(0.0, num7, 0.0);
				xyz7 += xyz19;
				xyz8 += xyz19;
				xyz9 += xyz19;
				xyz10 += xyz19;
			}
			XYZ xyz20 = new XYZ(length2, 0.0, 0.0);
			XYZ xyz21 = new XYZ(0.0, leftRunData.RunLength + width2, 0.0) + xyz20;
			XYZ xyz22 = new XYZ(0.0, leftRunData.RunLength + (width2 - twoRunLeftData.RunWidth), 0.0) + xyz20;
			XYZ xyz23 = new XYZ(twoRunLeftData.RunLength, leftRunData.RunLength + (width2 - twoRunLeftData.RunWidth), 0.0) + xyz20;
			XYZ xyz24 = new XYZ(twoRunLeftData.RunLength, leftRunData.RunLength + width2, 0.0) + xyz20;
			XYZ xyz25 = new XYZ(length2 + twoRunLeftData.RunLength + width, 0.0, 0.0);
			XYZ xyz26 = new XYZ(0.0, leftRunData.RunLength + width2, 0.0) + xyz25;
			XYZ xyz27 = new XYZ(twoRunRightData.RunLength, leftRunData.RunLength + width2, 0.0) + xyz25;
			XYZ xyz28 = new XYZ(twoRunRightData.RunLength, leftRunData.RunLength + (width2 - twoRunRightData.RunWidth), 0.0) + xyz25;
			XYZ xyz29 = new XYZ(0.0, leftRunData.RunLength + (width2 - twoRunRightData.RunWidth), 0.0) + xyz25;
			stairs.m_MidRunData.PtRunBottomLeft = xyz7;
			stairs.m_MidRunData.PtRunBottomRight = xyz8;
			stairs.m_MidRunData.PtRunTopLeft = xyz10;
			stairs.m_MidRunData.PtRunTopRight = xyz9;
			stairs.m_LeftRunData.PtRunBottomLeft = zero;
			stairs.m_LeftRunData.PtRunBottomRight = xyz3;
			stairs.m_LeftRunData.PtRunTopLeft = xyz5;
			stairs.m_LeftRunData.PtRunTopRight = xyz4;
			stairs.m_RightRunData.PtRunBottomLeft = xyz12;
			stairs.m_RightRunData.PtRunBottomRight = xyz13;
			stairs.m_RightRunData.PtRunTopLeft = xyz15;
			stairs.m_RightRunData.PtRunTopRight = xyz14;
			stairs.m_TwoRunLeftData.PtRunBottomLeft = xyz21;
			stairs.m_TwoRunLeftData.PtRunBottomRight = xyz22;
			stairs.m_TwoRunLeftData.PtRunTopLeft = xyz24;
			stairs.m_TwoRunLeftData.PtRunTopRight = xyz23;
			stairs.m_TwoRunRightData.PtRunBottomLeft = xyz28;
			stairs.m_TwoRunRightData.PtRunBottomRight = xyz27;
			stairs.m_TwoRunRightData.PtRunTopLeft = xyz29;
			stairs.m_TwoRunRightData.PtRunTopRight = xyz26;
			List<XYZ> list = new List<XYZ>();
			list.Add(zero);
			list.Add(xyz);
			list.Add(xyz2);
			list.Add(xyz13);
			list.Add(xyz8);
			list.Add(xyz7);
			stairs.m_listOutSupportPoints.Add(zero);
			stairs.m_listOutSupportPoints.Add(xyz5);
			stairs.m_listOutSupportPoints.Add(xyz);
			stairs.m_listOutSupportPoints.Add(xyz21);
			stairs.m_listOutSupportPoints.Add(xyz24);
			stairs.m_listOutSupportPoints.Add(xyz26);
			stairs.m_listOutSupportPoints.Add(xyz27);
			stairs.m_listOutSupportPoints.Add(xyz2);
			stairs.m_listOutSupportPoints.Add(xyz14);
			stairs.m_listOutSupportPoints.Add(xyz13);
			XYZ xyz30 = list[nBasePointIndex];
			base.CalulateTransform(bLRMirror, bTBMirror, dRotateAngle, stairsWidth, bundingBoxHeight, xyz30);
			stairs.m_ptPosition = Geometry.TransformPoint(xyz30, this.m_Transform);
			stairs.m_listOtherCurve.AddRange(base.DrawBasePoint(xyz30, 100.0));
			stairs.m_Transform = this.m_Transform;
			double bottomElevation;
			double bottomElevation2;
			if (bIsCenterUp)
			{
				SingleRunCurveInfo singleRunCurveInfo = new SingleRunCurveInfo();
				singleRunCurveInfo.BottomElevation = midRunData.BottomElevation;
				base.DrawLinearRun(midRunData, xyz7, xyz8, xyz9, xyz10, ref singleRunCurveInfo, ref stairs.m_listOtherCurve, bDrawNoteInfo);
				stairs.m_listRunCurve.Add(singleRunCurveInfo);
				singleRunCurveInfo = new SingleRunCurveInfo();
				singleRunCurveInfo.BottomElevation = leftRunData.BottomElevation;
				base.DrawLinearRun(leftRunData, xyz4, xyz5, zero, xyz3, ref singleRunCurveInfo, ref stairs.m_listOtherCurve, bDrawNoteInfo);
				stairs.m_listRunCurve.Add(singleRunCurveInfo);
				singleRunCurveInfo = new SingleRunCurveInfo();
				singleRunCurveInfo.BottomElevation = rightRunData.BottomElevation;
				base.DrawLinearRun(rightRunData, xyz14, xyz15, xyz12, xyz13, ref singleRunCurveInfo, ref stairs.m_listOtherCurve, bDrawNoteInfo);
				stairs.m_listRunCurve.Add(singleRunCurveInfo);
				singleRunCurveInfo = new SingleRunCurveInfo();
				singleRunCurveInfo.BottomElevation = twoRunLeftData.BottomElevation;
				base.DrawLinearRun(twoRunLeftData, xyz23, xyz24, xyz21, xyz22, ref singleRunCurveInfo, ref stairs.m_listOtherCurve, bDrawNoteInfo);
				stairs.m_listRunCurve.Add(singleRunCurveInfo);
				singleRunCurveInfo = new SingleRunCurveInfo();
				singleRunCurveInfo.BottomElevation = twoRunRightData.BottomElevation;
				base.DrawLinearRun(twoRunRightData, xyz26, xyz29, xyz28, xyz27, ref singleRunCurveInfo, ref stairs.m_listOtherCurve, bDrawNoteInfo);
				stairs.m_listRunCurve.Add(singleRunCurveInfo);
				bottomElevation = leftRunData.BottomElevation;
				bottomElevation2 = twoRunLeftData.BottomElevation;
			}
			else
			{
				SingleRunCurveInfo singleRunCurveInfo2 = new SingleRunCurveInfo();
				singleRunCurveInfo2.BottomElevation = midRunData.BottomElevation;
				base.DrawLinearRun(midRunData, xyz9, xyz10, xyz7, xyz8, ref singleRunCurveInfo2, ref stairs.m_listOtherCurve, bDrawNoteInfo);
				stairs.m_listRunCurve.Add(singleRunCurveInfo2);
				singleRunCurveInfo2 = new SingleRunCurveInfo();
				singleRunCurveInfo2.BottomElevation = leftRunData.BottomElevation;
				base.DrawLinearRun(leftRunData, zero, xyz3, xyz4, xyz5, ref singleRunCurveInfo2, ref stairs.m_listOtherCurve, bDrawNoteInfo);
				stairs.m_listRunCurve.Add(singleRunCurveInfo2);
				singleRunCurveInfo2 = new SingleRunCurveInfo();
				singleRunCurveInfo2.BottomElevation = rightRunData.BottomElevation;
				base.DrawLinearRun(rightRunData, xyz12, xyz13, xyz14, xyz15, ref singleRunCurveInfo2, ref stairs.m_listOtherCurve, bDrawNoteInfo);
				stairs.m_listRunCurve.Add(singleRunCurveInfo2);
				singleRunCurveInfo2 = new SingleRunCurveInfo();
				singleRunCurveInfo2.BottomElevation = twoRunLeftData.BottomElevation;
				base.DrawLinearRun(twoRunLeftData, xyz21, xyz22, xyz23, xyz24, ref singleRunCurveInfo2, ref stairs.m_listOtherCurve, bDrawNoteInfo);
				stairs.m_listRunCurve.Add(singleRunCurveInfo2);
				singleRunCurveInfo2 = new SingleRunCurveInfo();
				singleRunCurveInfo2.BottomElevation = twoRunRightData.BottomElevation;
				base.DrawLinearRun(twoRunRightData, xyz28, xyz27, xyz26, xyz29, ref singleRunCurveInfo2, ref stairs.m_listOtherCurve, bDrawNoteInfo);
				stairs.m_listRunCurve.Add(singleRunCurveInfo2);
				bottomElevation = twoRunLeftData.BottomElevation;
				bottomElevation2 = midRunData.BottomElevation;
			}
			if (bDrawNoteInfo)
			{
				XYZ xyz31 = XYZ.BasisY * 1.3;
				XYZ ptMid = (midRunData.PtRunBottomLeft + midRunData.PtRunBottomRight) / 2.0 - xyz31;
				XYZ ptLeft = (leftRunData.PtRunBottomLeft + leftRunData.PtRunBottomRight) / 2.0 - xyz31;
				XYZ ptRight = (rightRunData.PtRunBottomLeft + rightRunData.PtRunBottomRight) / 2.0 - xyz31;
				base.DrawUpStairsNoteInfo(ref stairs.m_listText, bIsCenterUp, ptLeft, ptMid, ptRight);
			}
			new List<CurveInfo>();
			this.DrawDoubleBranchThreeRunStairsLanding(ref stairs, xyz, xyz2, xyz24, bottomElevation, bottomElevation2);
			this.DrawDoubleBranchThreeRunStairsBeamCurves(ref stairs, bIsCenterUp, bBottom, bMid, bTop);
			this.DrawDoubleBranchThreeRunStairsNoteInfo(ref stairs, xyz, xyz2);
			return result;
		}

		private void DrawDoubleBranchThreeRunStairsLanding(ref DoubleBranchThreeRunStairs stairs, XYZ ptBaseLTS, XYZ ptBaseRTS, XYZ ptBaseLTM, double dSideLandBottom, double dMidLandBottom)
		{
			AngleLandingData sideLandData = stairs.m_SideLandData;
			AngleLandingData middleLandData = stairs.m_MiddleLandData;
			List<CurveInfo> list = new List<CurveInfo>();
			XYZ xyz = ptBaseLTS - XYZ.BasisY * sideLandData.Width;
			XYZ xyz2 = xyz + XYZ.BasisX * sideLandData.Length;
			XYZ xyz3 = ptBaseLTS + XYZ.BasisX * sideLandData.Length;
			list.Add(base.NewLine(PenColor.PC_Black, DashStyle.Solid, 2f, ptBaseLTS, xyz3, null));
			list.Add(base.NewLine(PenColor.PC_Black, DashStyle.Solid, 2f, xyz3, xyz2, null));
			list.Add(base.NewLine(PenColor.PC_Black, DashStyle.Solid, 2f, xyz2, xyz, null));
			list.Add(base.NewLine(PenColor.PC_Black, DashStyle.Solid, 2f, xyz, ptBaseLTS, null));
			LandingCurveInfo item = new LandingCurveInfo(list, dSideLandBottom);
			stairs.m_listLandCurve.Add(item);
			List<CurveInfo> list2 = new List<CurveInfo>();
			XYZ xyz4 = ptBaseRTS - XYZ.BasisX * sideLandData.Length;
			xyz = xyz4 - XYZ.BasisY * sideLandData.Width;
			xyz2 = ptBaseRTS - XYZ.BasisY * sideLandData.Width;
			list2.Add(base.NewLine(PenColor.PC_Black, DashStyle.Solid, 2f, xyz4, ptBaseRTS, null));
			list2.Add(base.NewLine(PenColor.PC_Black, DashStyle.Solid, 2f, ptBaseRTS, xyz2, null));
			list2.Add(base.NewLine(PenColor.PC_Black, DashStyle.Solid, 2f, xyz2, xyz, null));
			list2.Add(base.NewLine(PenColor.PC_Black, DashStyle.Solid, 2f, xyz, xyz4, null));
			LandingCurveInfo item2 = new LandingCurveInfo(list2, dSideLandBottom);
			stairs.m_listLandCurve.Add(item2);
			List<CurveInfo> list3 = new List<CurveInfo>();
			xyz3 = ptBaseLTM + XYZ.BasisX * middleLandData.Width;
			xyz2 = xyz3 - XYZ.BasisY * middleLandData.Length;
			xyz = ptBaseLTM - XYZ.BasisY * middleLandData.Length;
			list3.Add(base.NewLine(PenColor.PC_Black, DashStyle.Solid, 2f, ptBaseLTM, xyz3, null));
			list3.Add(base.NewLine(PenColor.PC_Black, DashStyle.Solid, 2f, xyz3, xyz2, null));
			list3.Add(base.NewLine(PenColor.PC_Black, DashStyle.Solid, 2f, xyz2, xyz, null));
			list3.Add(base.NewLine(PenColor.PC_Black, DashStyle.Solid, 2f, xyz, ptBaseLTM, null));
			LandingCurveInfo item3 = new LandingCurveInfo(list3, dMidLandBottom);
			stairs.m_listLandCurve.Add(item3);
		}

		private void DrawDoubleBranchThreeRunStairsBeamCurves(ref DoubleBranchThreeRunStairs stairs, bool bCenterStart, bool bBottom, bool bMid, bool bTop)
		{
			LineRunData leftRunData = stairs.m_LeftRunData;
			LineRunData midRunData = stairs.m_MidRunData;
			LineRunData rightRunData = stairs.m_RightRunData;
			LineRunData twoRunLeftData = stairs.m_TwoRunLeftData;
			LineRunData twoRunRightData = stairs.m_TwoRunRightData;
			XYZ xyz = new XYZ(0.0, stairs.m_BeamData.BeamWidth / 2.0, 0.0);
			if (bCenterStart)
			{
				XYZ ptS = XYZ.Zero;
				XYZ ptE = XYZ.Zero;
				if (bBottom)
				{
					List<CurveInfo> list = new List<CurveInfo>();
					ptS = midRunData.PtRunBottomLeft - xyz;
					ptE = midRunData.PtRunBottomRight - xyz;
					list.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS, ptE, xyz));
					double bottomElevation = midRunData.BottomElevation;
					BeamCurveInfo beamCurveInfo = new BeamCurveInfo(list, bottomElevation);
					beamCurveInfo.m_Type = BeamType.BT_Bottom;
					beamCurveInfo.m_nFloorNum = 0;
					stairs.m_listBeamCurve.Add(beamCurveInfo);
				}
				if (bMid)
				{
					XYZ xyz2 = new XYZ(stairs.m_SideLandData.Length - leftRunData.RunWidth, 0.0, 0.0);
					List<CurveInfo> list2 = new List<CurveInfo>();
					ptS = leftRunData.PtRunTopLeft + xyz;
					ptE = leftRunData.PtRunTopRight + xyz + xyz2;
					list2.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS, ptE, null));
					ptS = rightRunData.PtRunTopLeft + xyz - xyz2;
					ptE = rightRunData.PtRunTopRight + xyz;
					list2.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS, ptE, null));
					double bottomElevation = leftRunData.BottomElevation;
					BeamCurveInfo beamCurveInfo2 = new BeamCurveInfo(list2, bottomElevation);
					beamCurveInfo2.m_Type = BeamType.BT_Mid;
					beamCurveInfo2.m_nFloorNum = 1;
					stairs.m_listBeamCurve.Add(beamCurveInfo2);
					List<CurveInfo> list3 = new List<CurveInfo>();
					xyz2 = new XYZ((stairs.m_MiddleLandData.Width - midRunData.RunWidth) / 2.0, 0.0, 0.0);
					ptS = midRunData.PtRunTopLeft + xyz - xyz2;
					ptE = midRunData.PtRunTopRight + xyz + xyz2;
					list3.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS, ptE, null));
					bottomElevation = twoRunLeftData.BottomElevation;
					BeamCurveInfo beamCurveInfo3 = new BeamCurveInfo(list3, bottomElevation);
					beamCurveInfo3.m_Type = BeamType.BT_Mid;
					beamCurveInfo3.m_nFloorNum = 0;
					stairs.m_listBeamCurve.Add(beamCurveInfo3);
				}
				if (bTop)
				{
					List<CurveInfo> list4 = new List<CurveInfo>();
					ptS = leftRunData.PtRunBottomLeft - xyz;
					ptE = leftRunData.PtRunBottomRight - xyz;
					list4.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS, ptE, -xyz));
					ptS = rightRunData.PtRunBottomLeft - xyz;
					ptE = rightRunData.PtRunBottomRight - xyz;
					list4.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS, ptE, -xyz));
					double bottomElevation = twoRunLeftData.BottomElevation + twoRunLeftData.RunHeight + leftRunData.BottomElevation + leftRunData.RunHeight - leftRunData.TreadHeight;
					BeamCurveInfo beamCurveInfo4 = new BeamCurveInfo(list4, bottomElevation);
					beamCurveInfo4.m_Type = BeamType.BT_Top;
					beamCurveInfo4.m_nFloorNum = 0;
					stairs.m_listBeamCurve.Add(beamCurveInfo4);
					return;
				}
			}
			else
			{
				XYZ ptS2 = XYZ.Zero;
				XYZ ptE2 = XYZ.Zero;
				if (bBottom)
				{
					List<CurveInfo> list5 = new List<CurveInfo>();
					ptS2 = leftRunData.PtRunBottomLeft - xyz;
					ptE2 = leftRunData.PtRunBottomRight - xyz;
					list5.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS2, ptE2, xyz));
					ptS2 = rightRunData.PtRunBottomLeft - xyz;
					ptE2 = rightRunData.PtRunBottomRight - xyz;
					list5.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS2, ptE2, xyz));
					double bottomElevation2 = leftRunData.BottomElevation;
					BeamCurveInfo beamCurveInfo5 = new BeamCurveInfo(list5, bottomElevation2);
					beamCurveInfo5.m_Type = BeamType.BT_Bottom;
					beamCurveInfo5.m_nFloorNum = 0;
					stairs.m_listBeamCurve.Add(beamCurveInfo5);
				}
				if (bMid)
				{
					XYZ xyz3 = new XYZ(stairs.m_SideLandData.Length - leftRunData.RunWidth, 0.0, 0.0);
					List<CurveInfo> list6 = new List<CurveInfo>();
					ptS2 = leftRunData.PtRunTopLeft + xyz;
					ptE2 = leftRunData.PtRunTopRight + xyz + xyz3;
					list6.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS2, ptE2, null));
					ptS2 = rightRunData.PtRunTopLeft + xyz - xyz3;
					ptE2 = rightRunData.PtRunTopRight + xyz;
					list6.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS2, ptE2, null));
					double bottomElevation2 = twoRunLeftData.BottomElevation;
					BeamCurveInfo beamCurveInfo6 = new BeamCurveInfo(list6, bottomElevation2);
					beamCurveInfo6.m_Type = BeamType.BT_Mid;
					beamCurveInfo6.m_nFloorNum = 0;
					stairs.m_listBeamCurve.Add(beamCurveInfo6);
					List<CurveInfo> list7 = new List<CurveInfo>();
					xyz3 = new XYZ((stairs.m_MiddleLandData.Width - midRunData.RunWidth) / 2.0, 0.0, 0.0);
					ptS2 = midRunData.PtRunTopLeft + xyz - xyz3;
					ptE2 = midRunData.PtRunTopRight + xyz + xyz3;
					list7.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS2, ptE2, null));
					bottomElevation2 = midRunData.BottomElevation;
					BeamCurveInfo beamCurveInfo7 = new BeamCurveInfo(list7, bottomElevation2);
					beamCurveInfo7.m_Type = BeamType.BT_Mid;
					beamCurveInfo7.m_nFloorNum = 1;
					stairs.m_listBeamCurve.Add(beamCurveInfo7);
				}
				if (bTop)
				{
					List<CurveInfo> list8 = new List<CurveInfo>();
					ptS2 = midRunData.PtRunBottomLeft - xyz;
					ptE2 = midRunData.PtRunBottomRight - xyz;
					list8.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS2, ptE2, -xyz));
					double bottomElevation2 = twoRunLeftData.BottomElevation + twoRunLeftData.RunHeight + midRunData.BottomElevation + midRunData.RunHeight - midRunData.TreadHeight;
					BeamCurveInfo beamCurveInfo8 = new BeamCurveInfo(list8, bottomElevation2);
					beamCurveInfo8.m_Type = BeamType.BT_Top;
					beamCurveInfo8.m_nFloorNum = 0;
					stairs.m_listBeamCurve.Add(beamCurveInfo8);
				}
			}
		}

		private void DrawDoubleBranchThreeRunStairsNoteInfo(ref DoubleBranchThreeRunStairs stairs, XYZ ptLandLT, XYZ ptLandRT)
		{
			LineRunData leftRunData = stairs.m_LeftRunData;
			LineRunData midRunData = stairs.m_MidRunData;
			LineRunData rightRunData = stairs.m_RightRunData;
			LineRunData twoRunLeftData = stairs.m_TwoRunLeftData;
			LineRunData twoRunRightData = stairs.m_TwoRunRightData;
			double width = stairs.m_SideLandData.Width;
			double length = stairs.m_SideLandData.Length;
			double width2 = stairs.m_MiddleLandData.Width;
			double length2 = stairs.m_MiddleLandData.Length;
			XYZ xyz = XYZ.BasisY * 2.0;
			XYZ xyz2 = XYZ.BasisX * 2.0;
			XYZ ptStart = leftRunData.PtRunBottomLeft - xyz;
			XYZ ptEnd = leftRunData.PtRunBottomRight - xyz;
			base.DrawStairsNoteInfo(ref stairs.m_listOtherCurve, ref stairs.m_listText, ptStart, ptEnd, "边梯宽度", 0.8, 5.0, 2.0, 2, null);
			ptStart = rightRunData.PtRunBottomLeft - xyz;
			ptEnd = rightRunData.PtRunBottomRight - xyz;
			base.DrawStairsNoteInfo(ref stairs.m_listOtherCurve, ref stairs.m_listText, ptStart, ptEnd, "边梯宽度", 0.8, 5.0, 2.0, 2, null);
			ptStart = midRunData.PtRunBottomLeft - xyz;
			ptEnd = midRunData.PtRunBottomRight - xyz;
			base.DrawStairsNoteInfo(ref stairs.m_listOtherCurve, ref stairs.m_listText, ptStart, ptEnd, "中梯段宽", 0.8, 5.0, 2.0, 2, null);
			xyz = XYZ.BasisY * 1.0;
			xyz2 = XYZ.BasisX * 1.0;
			ptStart = leftRunData.PtRunTopLeft - xyz2;
			ptEnd = leftRunData.PtRunBottomLeft - xyz2;
			base.DrawStairsNoteInfo(ref stairs.m_listOtherCurve, ref stairs.m_listText, ptStart, ptEnd, "边梯段长左", 0.8, 2.0, 5.0, 2, null);
			ptStart = rightRunData.PtRunTopRight + xyz2;
			ptEnd = rightRunData.PtRunBottomRight + xyz2;
			base.DrawStairsNoteInfo(ref stairs.m_listOtherCurve, ref stairs.m_listText, ptStart, ptEnd, "边梯段长右", 0.8, 2.0, 5.0, 2, null);
			ptStart = rightRunData.PtRunBottomLeft + XYZ.BasisY * rightRunData.TreadDepth - XYZ.BasisX * 1.5;
			ptEnd = rightRunData.PtRunBottomLeft - XYZ.BasisX * 1.5;
			base.DrawStairsNoteInfo(ref stairs.m_listOtherCurve, ref stairs.m_listText, ptStart, ptEnd, "踏步宽度", 0.8, 2.0, 5.0, 2, null);
			ptStart = ptLandLT - xyz2;
			ptEnd = ptLandLT - XYZ.BasisY * width - xyz2;
			base.DrawStairsNoteInfo(ref stairs.m_listOtherCurve, ref stairs.m_listText, ptStart, ptEnd, "边平台宽左", 0.8, 2.0, 5.0, 2, null);
			ptStart = ptLandRT + xyz2;
			ptEnd = ptLandRT - XYZ.BasisY * width + xyz2;
			base.DrawStairsNoteInfo(ref stairs.m_listOtherCurve, ref stairs.m_listText, ptStart, ptEnd, "边平台宽右", 0.8, 2.0, 5.0, 2, null);
			ptStart = twoRunRightData.PtRunTopRight - XYZ.BasisX * 0.5;
			ptEnd = twoRunRightData.PtRunTopRight - XYZ.BasisY * length2 - XYZ.BasisX * 0.5;
			base.DrawStairsNoteInfo(ref stairs.m_listOtherCurve, ref stairs.m_listText, ptStart, ptEnd, "平台长度中", 0.8, 2.0, 5.0, 2, null);
			ptStart = ptLandLT + xyz;
			ptEnd = ptLandLT + XYZ.BasisX * length + xyz;
			base.DrawStairsNoteInfo(ref stairs.m_listOtherCurve, ref stairs.m_listText, ptStart, ptEnd, "边平台长", 0.8, 5.0, 2.0, 2, null);
			ptStart = ptLandRT - XYZ.BasisX * length + xyz;
			ptEnd = ptLandRT + xyz;
			base.DrawStairsNoteInfo(ref stairs.m_listOtherCurve, ref stairs.m_listText, ptStart, ptEnd, "边平台长", 0.8, 5.0, 2.0, 2, null);
			ptStart = twoRunLeftData.PtRunTopLeft + xyz;
			ptEnd = twoRunRightData.PtRunTopRight + xyz;
			base.DrawStairsNoteInfo(ref stairs.m_listOtherCurve, ref stairs.m_listText, ptStart, ptEnd, "中平台宽度", 0.8, 6.0, 2.0, 2, null);
			ptStart = twoRunLeftData.PtRunBottomLeft + xyz;
			ptEnd = twoRunLeftData.PtRunBottomLeft + XYZ.BasisX * twoRunLeftData.RunLength + xyz;
			base.DrawStairsNoteInfo(ref stairs.m_listOtherCurve, ref stairs.m_listText, ptStart, ptEnd, "二跑梯长", 0.8, 5.0, 2.0, 2, null);
			ptStart = twoRunRightData.PtRunTopRight + xyz;
			ptEnd = twoRunRightData.PtRunTopRight + XYZ.BasisX * twoRunRightData.RunLength + xyz;
			base.DrawStairsNoteInfo(ref stairs.m_listOtherCurve, ref stairs.m_listText, ptStart, ptEnd, "二跑梯长", 0.8, 5.0, 2.0, 2, null);
		}
	}
}
